home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / bp7bugs2.zip / TWINDOW.FIX < prev   
Text File  |  1992-04-18  |  861b  |  32 lines

  1.  
  2. #: 120 S0/CompuServe Mail
  3.     09-Mar-92 14:35 EST
  4. Sb: Another TP bug
  5. Fm: Hans Schleichert [100031,775]
  6.  
  7. Here we go again... I've found another bug in Turbo Vision...
  8.  
  9. Bug: A window that has neither the wfGrow now wfMove flags set does not
  10. disable the cmResize command when it is active.
  11.  
  12. Reason: A pair of parentheses is missing in the TWindow.SetState method.
  13.  
  14. Workaround: Create a descendant of TWindow with an overriden SetState
  15. method:
  16.     PROCEDURE TMyWindow.SetState (AState : Word ; Enable : Boolean) ;
  17.         BEGIN
  18.             TWindow.SetState (AState, Enable) ;
  19.             IF (AState = sfSelected) AND Enable THEN
  20.             IF Flags AND (wfGrow+wfMove) = 0 THEN
  21.             DisableCommands ([cmResize])
  22.         END ;
  23. Notice the parentheses around "wfGrow+wfMove" which are missing in the
  24. original.
  25.  
  26.  
  27.  
  28.   Action!
  29.  
  30.  
  31.  
  32.